1. Field of the Invention
The present invention relates to a method for monitoring execution of a program by a processor of an electronic circuit. It also relates to an electronic circuit comprising a programmable processor and a device for debugging a program, that are adapted for an implementation of such a method.
2. Description of the Related Art
A great number of appliances incorporate an electronic board designed specifically for a particular application, which corresponds to the use of the appliance or to a secondary function related to this use. Such a board takes the form of a printed electronic circuit (or PCB standing for “Printed Circuit Board”) which bears discrete and/or integrated electronic components, one of the latter being a processor. Such a processor is commonly integrated into an ASIC (standing for “Application Specific Integrated Circuit”). In order that functions of the board can be customized by the manufacturer of the appliance, the processor is generally programmable. Thus, different functions can be offered by identical but differently programmed boards. One and the same model of board can then be used in appliances of different clients, thereby enabling the unit price of the boards to be considerably reduced.
Among the appliances which incorporate an electronic board may be cited, by way of example, hard disk readers, modems, mobile telephones, washing machines, alarm clocks, etc. Different models of appliances of one and the same type, for example different hard disk readers, operate in a manner which varies as a function of the model of the appliance. These operational variants are obtained, in particular, through different programmings of the processors of the boards incorporated into these appliances, as a function of the model of these appliances.
The programming of the processor is performed by the manufacturer of the appliance (i.e., the client), and not by the manufacturer of the board. For the debugging of the program, the client uses a debugging tool, which makes it possible to search for and to correct any errors present in the program. The debugging tool is linked to the programmed processor, and makes it possible to control the execution of parts of the program by the processor. It identifies the programmed commands that are executed in succession, and affords access to states of certain elements of the processor such as the content of the registers, the state of certain buses, address values pointed at, etc. By knowing these states the programmer is able to modify the program, so as to correct errors present in the initial version.
To allow such debugging of a program, the electronic circuit comprises, in addition to the processor, a module for collecting data for the monitoring of the execution of the program. Included among the monitoring data collected are the states of elements of the processor at various instants during the execution of the program, as mentioned above. The IEEE 5001 standard, known to the person skilled in the art under the name “Nexus”, prescribes a selection of the monitoring data. It moreover fixes the structure of these monitoring data, and also the manner in which they are transmitted to the program debugging tool. The set of the selected monitoring data is also called the execution trace of the program and data associated with this program.
The bit rate of transmission of the monitoring data to the debugging tool depends on the speed of operation of the processor, on the speed of transmission of the monitoring data and on the dimension of the linking bus between the board which bears the processor and the debugging tool. By way of example, for a transmission operating at 150 megahertz and a two-byte bus, the transmission rate is 300 megabytes per second.
Now, it is forecast that in the years ahead, processors will exhibit an ever increasing complexity and speed of operation. Processors operating at around 1 gigahertz are envisaged. As a consequence, the bit rate of monitoring data transmitted to a debugging tool, necessary for efficiently monitoring in real time the execution of a program, is intended to increase considerably. Now, this bit rate is limited today to around 400 megabytes per second, for the 16-bit transmission modes currently used between the board which bears the processor and the debugging tool.
It is conceivable to store within the electronic circuit the data from monitoring the execution of the program, as and when they appear, and to transmit them to the debugging tool later, with a lower transmission bit rate than the speed of appearance of said monitoring data. Such a solution requires the provision of a large memory capacity in the circuit. But, such memory capacities are expensive. This would result in a high price of each appliance, while the added memory would not be useful during the normal operation of each appliance.